package com.bestcem.xm.user.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 是否开启投放审核
 *
 * @author wangyunyun <yunyun.wang@idiaoyan.com>
 * @version v1.0
 * @date 2022/3/4 10:47
 */
@Getter
@AllArgsConstructor
public enum OrgDeliverCheckFlagEnum {

    OPEN(0, "不开启"),
    NOT_OPEN(1, "开启"),
    ;

    private final Integer type;

    private final String desc;

    /**
     * 通过type获取
     *
     * @param type
     * @return
     */
    public static OrgDeliverCheckFlagEnum getByType(Integer type) {
        if (type != null) {
            for (OrgDeliverCheckFlagEnum value : values()) {
                if (value.getType().equals(type)) {
                    return value;
                }
            }
        }
        return null;
    }


}
